"use strict";
cc._RF.push(module, '88d84r2I+pByb0mfALzOr38', 'SettingView');
// scripts/SettingView.js

"use strict";

var t = require;
var e = module;
var o = exports;

var _i,
    n = void 0 && (void 0).__extends || (_i = function i(t, e) {
  return (_i = Object.setPrototypeOf || {
    __proto__: []
  } instanceof Array && function (t, e) {
    t.__proto__ = e;
  } || function (t, e) {
    for (var o in e) {
      Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
    }
  })(t, e);
}, function (t, e) {
  function o() {
    this.constructor = t;
  }

  _i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o());
}),
    a = void 0 && (void 0).__decorate || function (t, e, o, i) {
  var n,
      a = arguments.length,
      r = a < 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);else for (var s = t.length - 1; s >= 0; s--) {
    (n = t[s]) && (r = (a < 3 ? n(r) : a > 3 ? n(e, o, r) : n(e, o)) || r);
  }
  return a > 3 && r && Object.defineProperty(e, o, r), r;
};

Object.defineProperty(o, "__esModule", {
  value: !0
});

var r = t("GlobalUserData"),
    s = t("HallConstant"),
    l = t("LoadingScene"),
    c = t("BroadCastMessage"),
    d = t("SoundManager"),
    h = t("Util"),
    p = cc._decorator,
    u = p.ccclass,
    f = p.property,
    m = function (t) {
  function e() {
    var e = null !== t && t.apply(this, arguments) || this;
    return e.pfb_server = null, e.node_server = null, e.node_sound = null, e.node_vibrator = null, e.label_customer = null, e.label_server = null, e;
  }

  return n(e, t), e.prototype.onEnable = function () {
    this.node_sound.active = !r["default"].isOffMusic, this.node_vibrator.active = r["default"].isVibrator, r["default"].wx_channel == l.WXChannel.CHAOJI ? (this.label_customer.string = "客服联系方式：", this.label_server.string = "微信搜一搜【GameClub游戏中心】") : this.label_customer.node.parent.active = !1, h.Util.showBanner(), h.Util.hideSingleCustomAd(), h.Util.show_VerticalCustomAd(!1), h.Util.show_VerticalCustomAd(!0);
  }, e.prototype.onDisable = function () {
    h.Util.hideBanner(), h.Util.showSingleCustomAd(), h.Util.hide_VerticalCustomAd(!1), h.Util.hide_VerticalCustomAd(!0);
  }, e.prototype.start = function () {
    h.Util.is_qg() ? this.node_server.active = !0 : this.node_server.active = !1;
  }, e.prototype.onBtnShowServer = function () {
    var t = cc.instantiate(this.pfb_server);
    this.node.parent.addChild(t), this.onBtnClose();
  }, e.prototype.onBtnClose = function () {
    c["default"].getInstance().SendMessage(s.Broadcast_Func.Audio, s.Audio_ID.btn_click), this.node.destroy();
  }, e.prototype.onBtnSound = function () {
    r["default"].isOffMusic = !r["default"].isOffMusic, this.node_sound.active = !r["default"].isOffMusic, r["default"].isOffMusic ? d["default"].GetInstance().stopMusic() : d["default"].GetInstance().play_current_bgm();
  }, e.prototype.onBtnVibrator = function () {
    r["default"].isVibrator = !r["default"].isVibrator, this.node_vibrator.active = r["default"].isVibrator;
  }, a([f(cc.Prefab)], e.prototype, "pfb_server", void 0), a([f(cc.Node)], e.prototype, "node_server", void 0), a([f(cc.Node)], e.prototype, "node_sound", void 0), a([f(cc.Node)], e.prototype, "node_vibrator", void 0), a([f(cc.Label)], e.prototype, "label_customer", void 0), a([f(cc.Label)], e.prototype, "label_server", void 0), a([u], e);
}(cc.Component);

o["default"] = m;

cc._RF.pop();